package org.shuma.goods.utils;

import lombok.Getter;
import lombok.Setter;
import org.shuma.goods.contant.DelayLevel;

/**
 * @author : liuming
 * @date : 2024/6/18 下午3:07
 */
@Getter
@Setter
public class ProductScheduleMessage {
    /**
     * 商品id
     */
    private Long productId;
    /**
     * 操作类型
     */
    private ProductScheduleStatus operation;
    /**
     * 延时等级
     */
    private DelayLevel delayLevel;

    public ProductScheduleMessage() {
    }

    public ProductScheduleMessage(Long productId, ProductScheduleStatus status, long delayTime) {
        this.delayLevel = DelayLevel.getLevel(delayTime);
        this.operation = status;
        this.productId = productId;
    }

}
